﻿<div id="loginDialog" class="dialog">
    <div class="contentWrapper">
        <div class="msg">Please login below</div>
        <div>
            <input type="text" id="loginUsername" placeholder="username" /><br />
            <input type="password" id="loginPassword" placeholder="password" /><br />

            <div class="buttonBar"><span class="error">Access Denied!</span><img src="img/loader.gif" class="loader" />
                <input type="button" id="loginSubmit" value="Login" class="btn btn-primary" onclick="tryLogin()" />
            </div>
        </div>
    </div>
    <script type="text/javascript">
        $("#loginDialog").keydown(function (event) {
            if (event.keyCode == 13) $("#loginSubmit").click();
        });
        $("#addSiteDialog").keydown(function (event) {
            if (event.keyCode == 13) $("#addNewSiteSave").click();
            if (event.keyCode == 27) $("#addNewSiteCancel").click();
        });
        $("#siteBindingDialog").keydown(function (event) {
            if (event.keyCode == 13) $("#siteBindingDialogSaveButton").click();
            if (event.keyCode == 27) $("#siteBindingDialogCancelButton").click();
        });
        $("#editSiteDialog").keydown(function (event) {
            if (event.keyCode == 13) $("#editSiteSave").click();
            if (event.keyCode == 27) $("#editSiteCancel").click();
        });
    </script>
</div>


<div id="disconnectedDialog" class="dialog">
    <div class="title">Hmm... that's weird</div>
    <div class="contentWrapper">
        <div>Sorry cap'n, something went wrong!<br /><br />
            <div id="stopReason" class="error" style="display:block"></div>
        </div>
        <div class="buttonBar">
            <input type="button" value="Try to continue" class="btn btn-warning" onclick="hideDialog()" />
            <input type="button" value="Reload" class="btn btn-danger" onclick="window.location.reload()" />
        </div>
    </div>
</div>


<div id="addSiteDialog" class="dialog">
    <div class="title">Add a new site</div>
    <div class="contentWrapper">
        <div><strong>Site Name</strong>&nbsp;<input type="text" id="newSiteName" placeholder="My website" /></div>
        
        <div class="buttonBar"><span class="error"></span><img src="img/loader.gif" class="loader" />
            <input type="button" id="addNewSiteCancel" value="Cancel" class="btn btn-inverse" onclick="closeNewSiteDialog()" />
            <input type="button" id="addNewSiteSave" value="Save" class="btn btn-primary" onclick="addNewSite($('#newSiteName').val());" />
        </div>
    </div>
</div>

<div id="editSiteDialog" class="dialog">
    <div class="title">Edit site</div>
    <div class="contentWrapper">
        <div><strong>Site Id</strong><br /><input type="text" disabled="disabled" class="siteId" value="2" /></div>
        <div><strong>Name</strong><br /><input type="text" class="siteName" placeholder="My website" /></div>
        <div><strong>URL</strong><br /><input type="text" class="siteUrl" placeholder="http://www.sample.com" /></div>
        
        <div class="buttonBar"><span class="error"></span><img src="img/loader.gif" class="loader" />
            <input type="button" id="editSiteCancel" value="Cancel" class="btn btn-inverse" onclick="hideDialog()" />
            <input type="button" id="editSiteSave" value="Save" class="btn btn-primary" onclick="saveEditSiteChanges()" />
        </div>
    </div>
</div>


<div id="siteBindingDialog" class="dialog">
    <div class="title">Site Binding</div>
    <div class="contentWrapper">
        <div><strong>Host</strong><br /><input type="text" class="hosttxt" placeholder="Empty will match any domain" /></div>
        <div><strong>Port</strong><br /><input type="text" class="porttxt" placeholder="80 for HTTP or 443 for HTTPS" /></div>
        <div><input type="checkbox" onclick="toggleHttps()" class="checkbox" id="isHttpsBinding" style="margin:0px 5px 0px 15px;" /> <label for="isHttpsBinding" style="display:inline">HTTPS/SSL Binding</label></div>
        <div style="padding-top:5px" id="certificateThumbprint"><strong>HTTPS Certificate</strong><br /><input type="text" class="certtxt" /></div>
        

        <div class="buttonBar"><span class="error"></span><img src="img/loader.gif" class="loader" />
            <input type="button" id="siteBindingDialogDeleteButton" value="Delete" class="btn btn-danger" style="float:left" onclick="if (deleteSiteBinding(selectedBindingIndex)) hideDialog();" />
            <input type="button" id="siteBindingDialogCancelButton" value="Cancel" class="btn btn-inverse" onclick="hideDialog()" />
            <input type="button" id="siteBindingDialogSaveButton" value="OK" class="btn btn-primary" onclick="applyBinding()" />
        </div>
    </div>
</div>